package com.liry.zk;

import java.security.NoSuchAlgorithmException;
import org.apache.zookeeper.server.auth.DigestAuthenticationProvider;

/**
 * super权限测试 - 生成秘钥
 * @author ALI
 * @since 2022/12/23
 */
public class GeneratorKey {

    public static void main(String[] args) throws NoSuchAlgorithmException {
        // ZooKeeper会对明文Id先后进行两次编码，分别是SHA-1算法加密和BASE64编码
        System.out.println(DigestAuthenticationProvider.generateDigest("super:admin"));
    }
}
